GATE CSE 2014 SET-2


Q31.

Consider two strings A="qpqrr" and B="pqprqrp". Let x be the length of the longest common subsequence (not necessarily contiguous) between A and B and let y be the number of such longest common subsequences between A and B. Then x + 10y = ___.
GateOverflow

Q32.

The dual of a Boolean function F(x_{1},x_{2},...,x_{n}, +, \cdot , ' ) , written as F^{D}, is the same expression as that of F with + and \cdot swapped. F is said to be self-dual if F=F^{D}. The number of self-dual functions with n Boolean variables is
GateOverflow

Q33.

A FAT (file allocation table) based file system is being used and the total overhead of each entry in the FAT is 4 bytes in size. Given a 100x10^{6} bytes disk on which the file system is stored and data block size is 10^{3} bytes, the maximum size of a file that can be stored on this disk in units of 10^{6} bytes is _______.
GateOverflow

Q34.

The maximum number of edges in a bipartite graph on 12 vertices is _____.
GateOverflow

Q35.

A cycle on n vertices is isomorphic to its complement. The value of n is _____.
GateOverflow

Q36.

Consider the C function given below int f(int j) { static int i = 50; int k; if (i == j) { printf("something"); k = f(i); return 0; } else return 0; } Which one of the following is TRUE?
GateOverflow

Q37.

Consider the following function double f (double x) { if ( abs (x*x - 3) < 0. 01) return x; else return f (x / 2 + 1.5/x); } Give a value q (to 2 decimals) such that f(q) will return q:______
GateOverflow

Q38.

A priority queue is implemented as a Max-Heap. Initially, it has 5 elements. The level-order traversal of the heap is: 10, 8, 5, 3, 2. Two new elements 1 and 7 are inserted into the heap in that order. The level-order traversal of the heap after the insertion of the elements is:
GateOverflow

Q39.

Suppose P, Q, R, S, T are sorted sequences having lengths 20, 24, 30, 35, 50 respectively. They are to be merged into a single sequence by merging together two sequences at a time. The number of comparisons that will be needed in the worst case by the optimal algorithm for doing this is ____.
GateOverflow

Q40.

For a C program accessing x[i][j][k], the following intermediate code is generated by a compiler. Assume that the size of an integer is 32 bits and the size of a character is 8 bits. t0 = i * 1024 t1 = j * 32 t2 = k * 4 t3 = t1 + t0 t4 = t3 + t2 t5 = x[t4] Which one of the following statements about the source code for the C program is CORRECT?
GateOverflow